A machine tool mounted with a numerical control device drives each axis to move a tool to a position instructed by the numerical control device. Regarding a conventional numerical control device that controls a multi-axis machine tool provided with a rotary axis, when a tool is not oriented perpendicular to a machining surface, the conventional numerical control device usually rotates the rotary axis to control an orientation of the tool such that the tool is oriented perpendicular to the machining surface.
As a method of controlling an orientation of a tool such that the tool is oriented perpendicular to a tilted machining surface, there is a method proposed in Patent Literature 1 for example. Patent Literature 1 discloses determining any one of a method of moving a rotary axis and a method of moving the rotary axis and a linear axis to retain a tool tip position with respect to a workpiece. Regarding a machine tool provided with a turret lathe, Patent Literatures 2 and 3 disclose a method of automatically calculating an indexing angle depending on selection of a tool mounted on the turret lathe.